<?php

class Container extends Eloquent implements CrudableInterface
{
    public function group() {
        return $this->belongsTo('Group');
    }

    public function showTitle() 
    {
        return $this->name;
    }

    public function showFields()
    {
        return array (
            'ID' => $this->id,
            'Name' => $this->name,
        );
    }

    public static function indexColumns()
    {
        return array (
            'ID' => array (
                'type'=>'numeric',
                'field'=>'id'
            ),
            'Name' => array (
                'type'=>'string',
                'field'=>'name'
            ),
        );
    }

    public static function editFields($obj=null)
    {
        return array (
            'name' => array (
                'type'=>'text',
                'label'=>'Name',
            ),
        );
        
    }
}